<template>
	<el-main>
		<el-card shadow="never">
			<el-tabs tab-position="top">

				<el-tab-pane label="审核开关">
					<el-form ref="form" :model="sys" label-width="100px" style="margin-top: 20px;">
						<el-form-item label="会员审核">
							<el-switch v-model="form.MemberReview" active-value="1" inactive-value="0"></el-switch>
						</el-form-item>
						<el-form-item label="视频审核">
							<el-switch v-model="form.VideoAudit" active-value="1" inactive-value="0"></el-switch>
						</el-form-item>
						<el-form-item label="店铺审核">
							<el-switch v-model="form.StoreAudit" active-value="1" inactive-value="0"></el-switch>
						</el-form-item>
						<el-form-item>
							<el-button type="primary" @click="baocun">保存</el-button>
						</el-form-item>
					</el-form>
				</el-tab-pane>



			</el-tabs>
		</el-card>
	</el-main>
</template>

<script>
export default {
	name: 'system',
	data() {
		return {
			form:{
				MemberReview:"",
				VideoAudit:"",
				StoreAudit:""
			}

		}
	},
	mounted() {
		this.getData()
	},
	methods: {
		async getData(){
			let data = {key:'MemberReview,VideoAudit,StoreAudit'}
			var system = await this.$API.system.key.get(data);
			this.form = system.data
		},
		baocun(){
			console.log(this.form)
			this.$API.system.keyedit.post(this.form).then((res)=>{
				this.$message.success(res.msg)
				this.getData()
			})
		}

	}
}
</script>

<style>
</style>
